package uapp;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class Page implements Serializable {

	private static final long serialVersionUID = 5535893066131132825L;

	private Application application;
	private String id;
	private String location;
	private String name;
	private String description;
	private boolean visible;
	private String layout;
	private List<Widget> widgets;

	public Application getApplication() {
		return application;
	}

	public void setApplication(Application application) {
		this.application = application;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getLocation() {
		return location;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setLayout(String layout) {
		this.layout = layout;
	}

	public String getLayout() {
		return layout;
	}

	public List<Widget> getWidgets() {
		if (widgets == null)
			widgets = new ArrayList<Widget>();
		for (Widget widget : widgets)
			widget.setPage(this);
		return widgets;
	}
}
